package br.com.backupandrestore.tela;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;
import javax.swing.border.EtchedBorder;
import javax.swing.JLabel;
import java.awt.Color;
import javax.swing.Box;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.UIManager;
import java.awt.Font;
import javax.swing.JTextField;

public class Tela extends JFrame {

	private JPanel contentPane;
	private JTextField txtPathDatabase;
	private JTextField txtDatabaseBackup;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Tela frame = new Tela();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Tela() {
		setResizable(false);
		setTitle("Utilit\u00E1rio - Banco de Dados");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 489);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, BorderLayout.CENTER);
		
		JPanel backup = new JPanel();
		tabbedPane.addTab("Backup", null, backup, "");
		backup.setLayout(null);
		
		JLabel lblFiles = new JLabel("Files");
		lblFiles.setFont(new Font("Times New Roman", Font.BOLD | Font.ITALIC, 12));
		lblFiles.setForeground(UIManager.getColor("CheckBoxMenuItem.selectionBackground"));
		lblFiles.setBounds(10, 11, 46, 14);
		backup.add(lblFiles);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
		panel_1.setBounds(10, 29, 407, 112);
		backup.add(panel_1);
		panel_1.setLayout(null);
		
		JLabel lblDatabaseName = new JLabel("Database Name (Ex: C:\\mysql\\banco.sql");
		lblDatabaseName.setBounds(10, 11, 253, 14);
		panel_1.add(lblDatabaseName);
		
		txtPathDatabase = new JTextField();
		txtPathDatabase.setText("Informe o path do banco de dados");
		txtPathDatabase.setBounds(10, 25, 387, 20);
		panel_1.add(txtPathDatabase);
		txtPathDatabase.setColumns(10);
		
		JLabel lblDatabaseBackup = new JLabel("Backup File (Ex.: C:\\backups\\backup.gbk");
		lblDatabaseBackup.setBounds(10, 62, 253, 14);
		panel_1.add(lblDatabaseBackup);
		
		txtDatabaseBackup = new JTextField();
		txtDatabaseBackup.setText("Informe o path de destino do banco de dados");
		txtDatabaseBackup.setBounds(10, 79, 387, 20);
		panel_1.add(txtDatabaseBackup);
		txtDatabaseBackup.setColumns(10);
		
		JPanel restore = new JPanel();
		tabbedPane.addTab("Restore", null, restore, null);
		
		JPanel panel = new JPanel();
		tabbedPane.addTab("Configura\u00E7\u00F5es", null, panel, null);
	}
}
